<?php
namespace App\Services;

use App\Contracts\PaymentGateway;
use Illuminate\Support\Facades\DB;

//实现契约方法
//然后服务容器中绑定契约和实现
class StripePaymentGateway implements PaymentGateway
{
    public function charge($amount)
    {
        // 实现 Stripe 支付逻辑
        DB::table('test')->insert(['test1'=>'这是契约的实现测试','test2'=>$amount]);
    }
}